<?php
/**
 * Created by yuxianjun001@icloud.com.
 * User: wuchen
 * Date: 2019/4/28
 * Time: 11:17
 */

namespace App\Providers;


use App\Facades\TestFacade;
use Illuminate\Support\ServiceProvider;

/**
 * 自定义的门面门面模式 服务提供者
 * Class FacadeServiceProvider
 * @package App\Providers
 */
class FacadeServiceProvider extends ServiceProvider
{
    public function boot(){
        //parent::boot();
    }

    public function register(){
        //如下按照单例模式去创建不同的自定义门面
        $this->app->singleton('test', function ($app) {
            return new TestFacade();
        });

    }


}